package co.yixiang.yshop.module.cart.controller.app.cart.param;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @ClassName 添加购物车CartParam
 * @Author hupeng <610796224@qq.com>
 * @Date 2023/6/16
 **/
@Getter
@Setter
@Schema(description = "用户 APP - 添加购物车参数")
public class AppCartParam {

    @Min(value = 1, message = "数量不在合法范围内")
    @Max(value = 9999, message = "数量不在合法范围内")
    @Schema(description = "购物车数量", required = true)
    private Integer cartNum;

    @JsonProperty(value = "new")
    @Schema(description = "是否立即购买1-是 0-否表示加入购物车列表", required = true)
    private Integer isNew = 0;

    @NotNull(message = "参数有误")
    @Schema(description = "产品ID", required = true)
    private Long productId;

    @Schema(description = "商品属性sku的unique值", required = true)
    private String uniqueId;

    @Schema(description = "产品拼团ID", required = true)
    private Long combinationId = 0L;

    @Schema(description = "产品秒杀ID", required = true)
    private Long secKillId = 0L;

    @Schema(description = "产品砍价ID", required = true)
    private Long bargainId = 0L;

    @Schema(description = "积分商城活动ID", required = true)
    private Long integralShopId = 0L;

    @Schema(description = "下单类型：1、普通下单，2、商品活动下单 ", required = true)
    private Integer orderType;

    @Schema(description = "活动id", required = true)
    private Long campaignId;

    @Schema(description = "拼团id", required = true)
    private Long teamworkId;
}
